<template>
  <div class="demo-input-suffix">
    选择报告类型
    <el-select v-model="tId" placeholder="请选择" @change="towerChange">
      <el-option  label="周报" value="1"></el-option>
      <el-option  label="月报" value="2"></el-option>
      <el-option  label="预警公文" value="3"></el-option>
    </el-select>
    <!-- <el-button  icon="el-icon-search" class="select" @click="findByTid" type="primary">查询</el-button> -->
    <el-button icon="el-icon-plus" class="save" @click="addProductHandle" type="info">添加</el-button>
    <el-button icon="el-icon-s-finance" class="save" @click="week" type="primary">导出周报表</el-button>
    <el-button icon="el-icon-s-claim" class="save" @click="month" type="primary">导出月报表</el-button>
  </div>
</template>

<script>
import api from '../../../api'
export default {
  data() {
    return {
      tunnelList: [],
      tId: ''
    }
  },
  mounted() {
    // 查询隧道
    api
      .tunnelInfoFindByAll()
      .then((res) => {
        if (res.data.code == 2001) {
          this.tunnelList = res.data.data
        }
      })
      .catch((err) => {
        console.log(err)
      })
  },
  methods: {
    addProductHandle() {
      this.$bus.$emit('onAddMonitorReportShow', true)
    },
    towerChange(type) {
      this.$emit("onReshMonitorReport",type)
    },
    week(){
      this.$bus.$emit('MonitorInfoWeekShow', true) 
    },
    month(){
      this.$bus.$emit('MonitorInfoMonthShow', true) 
    }
}
}
</script>

<style scoped>
.demo-input-suffix {
  margin-top: 20px;
  text-align: left;
}
.select {
  margin-left: 10px;
}

.save {
  margin-left: 10px;
  border: none;
  border: 2px solid #409eff;
  background-color: white;
  color: #409eff;
}
</style>